package com.ruoyi.purchase.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.product.domain.SysProduct;
import com.ruoyi.supplier.domain.SysSupplier;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 商品进货对象 sys_purchase
 * 
 * @author chenjiujia
 * @date 2025-04-29
 */
public class SysPurchase extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 进货ID */
    private Long id;

    /** 供应商ID */
    @Excel(name = "供应商ID")
    private Long supplierId;

    /** 商品ID */
    @Excel(name = "商品ID")
    private Long productId;

    /** 支付类型（现金、转账、微信、支付宝） */
    @Excel(name = "支付类型", readConverterExp = "现=金、转账、微信、支付宝")
    private String paymentType;

    /** 进货时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "进货时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date purchaseTime;

    /** 操作员 */
    @Excel(name = "操作员")
    private String operator;

    /** 进货数量 */
    @Excel(name = "进货数量")
    private Long purchaseQuantity;

    /** 进货价格 */
    @Excel(name = "进货价格")
    private BigDecimal purchasePrice;

    /** 总金额 */
    private BigDecimal totalAmount;

    /** 删除标志（0代表存在 1代表删除） */
    private String delFlag;

    private SysSupplier sysSupplier;

    private SysProduct sysProduct;

    public SysSupplier getSysSupplier() {
        return sysSupplier;
    }

    public void setSysSupplier(SysSupplier sysSupplier) {
        this.sysSupplier = sysSupplier;
    }

    public SysProduct getSysProduct() {
        return sysProduct;
    }

    public void setSysProduct(SysProduct sysProduct) {
        this.sysProduct = sysProduct;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setSupplierId(Long supplierId) 
    {
        this.supplierId = supplierId;
    }

    public Long getSupplierId() 
    {
        return supplierId;
    }

    public void setProductId(Long productId) 
    {
        this.productId = productId;
    }

    public Long getProductId() 
    {
        return productId;
    }

    public void setPaymentType(String paymentType) 
    {
        this.paymentType = paymentType;
    }

    public String getPaymentType() 
    {
        return paymentType;
    }

    public void setPurchaseTime(Date purchaseTime) 
    {
        this.purchaseTime = purchaseTime;
    }

    public Date getPurchaseTime() 
    {
        return purchaseTime;
    }

    public void setOperator(String operator) 
    {
        this.operator = operator;
    }

    public String getOperator() 
    {
        return operator;
    }

    public void setPurchaseQuantity(Long purchaseQuantity) 
    {
        this.purchaseQuantity = purchaseQuantity;
    }

    public Long getPurchaseQuantity() 
    {
        return purchaseQuantity;
    }

    public void setPurchasePrice(BigDecimal purchasePrice) 
    {
        this.purchasePrice = purchasePrice;
    }

    public BigDecimal getPurchasePrice() 
    {
        return purchasePrice;
    }

    public void setTotalAmount(BigDecimal totalAmount) 
    {
        this.totalAmount = totalAmount;
    }

    public BigDecimal getTotalAmount() 
    {
        return totalAmount;
    }

    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }


    @Override
    public String toString() {
        return "SysPurchase{" +
                "id=" + id +
                ", supplierId=" + supplierId +
                ", productId=" + productId +
                ", paymentType='" + paymentType + '\'' +
                ", purchaseTime=" + purchaseTime +
                ", operator='" + operator + '\'' +
                ", purchaseQuantity=" + purchaseQuantity +
                ", purchasePrice=" + purchasePrice +
                ", totalAmount=" + totalAmount +
                ", delFlag='" + delFlag + '\'' +
                ", sysSupplier=" + sysSupplier +
                ", product=" + sysProduct +
                '}';
    }

}
